/*
 * Forest.h
 *
 *  Created on: May 21, 2011
 *      Author: trungtq
 */

#ifndef FOREST_H_
#define FOREST_H_

#include "Tree.h"
#include "OutLabel.h"

typedef map<TermPair, EquationList, TermPairCompare>    EdgeMap;

class Forest {

private:
    TreeSet trees;

public:
    Forest();
    Forest(Tree* tree);
    Forest(TreeSet trees);
    virtual ~Forest();

public:
    TreeSet getTreeSet();

public:
    bool insertTree(Tree* tree);
    bool insertEdge(Node* child, Node* parent);
    bool insertEdge(Node* child, Node* parent, OutLabel* label);
    Tree* findTreeByRoot(Node* root);
    Tree* findTreeByNode(Node* node);
    Node* findHighestNode(Node* node);
    void print();
};

#endif /* FOREST_H_ */
